const express = require("express");
const jdData = require("./data.json");
const app = express();
app.get("/",(req,res)=>{
	res.send(jdData.map(item=>{
		return (`
			<div>
				<h3>${item.keyword}</h3>
				<div style="display:flex;">
					${item.level2words.map(info=>(`
						<a href="https://so.m.jd.com/ware/search.action?key=${info.keyword}">
							<img height="80" src="${info.imageUrl}" alt="">
							<h5>${info.keyword}</h5>
						</a>
					`)).join("")}
				</div>
			</div>
		`)
	}).join(""))
})
app.listen(80,()=>{
	console.log("success")
})